﻿@model BenzInfo.Hockey.Grenadiers.Models.Game

<div class="event">
    <h1>@(ViewBag.Lang == "fr" ? Model.TitleFR : Model.TitleEN)</h1>

    @if (Model.DateStart > DateTime.Now)
    {
        <div id="nextgame">
            <a href="#" class="home" style="background-image: url(@Url.Content("~/Utils/ImageHandler.ashx?src=logos/" + Model.HomeTeam.Logo + "&maxwidth=75&maxheight=75"));background-repeat:no-repeat;"></a>
            <a href="#" class="away" style="background-image: url(@Url.Content("~/Utils/ImageHandler.ashx?src=logos/" + Model.AwayTeam.Logo + "&maxwidth=75&maxheight=75"));background-repeat:no-repeat;"></a>
            <span class="date">@Model.DateStart.ToString("yyyy-MM-dd HH:mm")</span>
        </div>
    }
    else
    {
        <div id="lastgame">
            <a href="#" class="home" style="background-image: url(@Url.Content("~/Utils/ImageHandler.ashx?src=logos/" + Model.HomeTeam.Logo + "&maxwidth=75&maxheight=75"));background-repeat:no-repeat;"></a>
            <a href="#" class="away" style="background-image: url(@Url.Content("~/Utils/ImageHandler.ashx?src=logos/" + Model.AwayTeam.Logo + "&maxwidth=75&maxheight=75"));background-repeat:no-repeat;"></a>
            <span class="scorehome">@Model.HomeScore</span>
            <span class="scoreaway">@Model.AwayScore</span>
        </div>
    }

    <h2>
        Description 
        <span class="startdate">@Model.DateStart.ToString("yyyy-MM-dd HH:mm")</span>
    </h2>
    <div>
        @Html.Raw(ViewBag.Lang == "fr" ? Model.ContentFR : Model.ContentEN)
    </div>
</div>